package com.github.caijh.mall.system.request;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.github.caijh.framework.core.model.ReqBody;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SystemAdminAddReqBody对象", description = "后台管理员表")
public class SystemAdminAddReqBody implements ReqBody {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "后台管理员账号", required = true)
    @NotNull(message = "后台管理员账号不能为空")
    private String account;

    @ApiModelProperty(value = "后台管理员密码", required = true)
    @NotNull(message = "管理员密码不能为空")
    private String pwd;

    @ApiModelProperty(value = "后台管理员姓名", required = true)
    @NotNull(message = "管理姓名不能为空")
    private String realName;

    @ApiModelProperty(value = "后台管理员权限(menus_id)", required = true)
    @NotBlank(message = "role不能为空")
    private String roles;

    @ApiModelProperty(value = "后台管理员级别", required = true)
    @Min(value = 0, message = "管理员级别不能小于0")
    private Integer level;

    @ApiModelProperty(value = "后台管理员状态 1有效0无效", required = true)
    @NotNull(message = "status 字段不能为空")
    private Boolean status;

}
